//
//  MyAccountPageController.m
//  WashForU
//
//  Created by 王俊 on 15/12/10.
//  Copyright © 2015年 王俊. All rights reserved.
//

#import "MyAccountPageController.h"

@interface MyAccountPageController ()

@property(nonatomic,strong)MyAccountCustomButton          *coinButton;
@property(nonatomic,strong)MyAccountCustomButton          *ticketButton;




@end

@implementation MyAccountPageController

- (void)viewDidLoad
{
    [super viewDidLoad];
    [self customViewSetUp];
    [self customConstrainsAdd];
    [self targetAdd];
}
/*****************添加视图组件********************/
- (void)customViewSetUp
{
    
    self.titleLabel.text = @"我的帐户";
    
    self.coinButton = [[MyAccountCustomButton alloc]initWithTitle:@"我的洗衣币"];
    self.ticketButton = [[MyAccountCustomButton alloc]initWithTitle:@"我的洗衣券"];
    [self.view addSubview:self.coinButton];
    [self.view addSubview:self.ticketButton];

    
    
}
/*******************添加约束**********************/
- (void)customConstrainsAdd
{
    [self.coinButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.trailing.equalTo(self.view);
        make.height.mas_equalTo(50);
        make.top.equalTo(self.upView.mas_bottom).offset(10);
    }];
    [self.ticketButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.trailing.height.equalTo(self.coinButton);
        make.top.equalTo(self.coinButton.mas_bottom).offset(5);
    }];

}

- (void)targetAdd
{
    
    [self.backButton addTarget:self action:@selector(backButtonClicked) forControlEvents:UIControlEventTouchUpInside];
}


@end
